
#if !defined(AFX_GYDATABASE_H_INCLUDED_20120626)
#define AFX_GYDATABASE_H_INCLUDED_20120626

#include "AfxDb.h"

class CGYDataSet : public CRecordset
{
public:
	CGYDataSet();
	CGYDataSet(CString strSQL);
	virtual ~CGYDataSet();

	BOOL				ConnectDatabase();

	BOOL				OpenTable(CString strSQL);
	BOOL				ExecuteSQL(CString strSQL);

	BOOL				BeginTrans();
	BOOL				CommitTrans();
	BOOL				Rollback();
	
	CString				GetLastErrorString(){return m_strLastError;}
	RETCODE				GetLastErrorCode(){return m_rcLastError;}
	
private:
	 static CDatabase	m_db;

	 CString			m_strLastError;
	 RETCODE			m_rcLastError;
	 
};



#endif//AFX_GYDATABASE_H_INCLUDED_20120626